home *** CD-ROM | disk | FTP | other *** search
- on hPressButton
- global gLastSprite
- set vSprite to the clickOn
- set vCastNo to the castNum of sprite vSprite
- set vCastNam to the name of cast vCastNo
- puppetSprite(vSprite, 1)
- if (vCastNam = 0) or (vCastNam = EMPTY) then
- set the castNum of sprite vSprite to vCastNo + 1
- else
- if vCastNam contains "ROLLOVER" then
- set the castNum of sprite vSprite to vCastNo + 1
- else
- set the castNum of sprite vSprite to the number of cast (vCastNam & "-down")
- end if
- end if
- updateStage()
- repeat while the stillDown
- hStillDownScript(vSprite)
- end repeat
- if (vCastNam = 0) or (vCastNam = EMPTY) then
- set the castNum of sprite vSprite to vCastNo
- else
- set the castNum of sprite vSprite to the number of cast vCastNam
- end if
- puppetSprite(vSprite, 0)
- updateStage()
- if the mouseCast = the castNum of sprite vSprite then
- return 1
- else
- return 0
- end if
- end
-
- on hRolloverScript vFrameLabel
- global gLastSprite
- set vNowSprite to 0
- if vFrameLabel = "Main" then
- if rollOver(4) then
- set vNowSprite to 4
- else
- if rollOver(5) then
- set vNowSprite to 5
- else
- if rollOver(6) then
- set vNowSprite to 6
- else
- if rollOver(7) then
- set vNowSprite to 7
- else
- if rollOver(8) then
- set vNowSprite to 8
- else
- if rollOver(9) then
- set vNowSprite to 9
- else
- if rollOver(10) then
- set vNowSprite to 10
- else
- if rollOver(11) then
- set vNowSprite to 11
- else
- if rollOver(12) then
- set vNowSprite to 12
- else
- if rollOver(13) then
- set vNowSprite to 13
- else
- if rollOver(15) then
- set vNowSprite to 15
- else
- if rollOver(16) then
- set vNowSprite to 16
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- else
- if vFrameLabel = "Popup" then
- if rollOver(22) then
- set vNowSprite to 22
- else
- if rollOver(23) then
- set vNowSprite to 23
- else
- if rollOver(24) then
- set vNowSprite to 24
- else
- if rollOver(25) then
- set vNowSprite to 25
- else
- if rollOver(26) then
- set vNowSprite to 26
- else
- if rollOver(27) then
- set vNowSprite to 27
- else
- if rollOver(28) then
- set vNowSprite to 28
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- else
- if vFrameLabel = "WebPopup" then
- if rollOver(22) then
- set vNowSprite to 22
- else
- if rollOver(23) then
- set vNowSprite to 23
- else
- if rollOver(24) then
- set vNowSprite to 24
- end if
- end if
- end if
- end if
- end if
- end if
- if not (vNowSprite = 0) then
- set vCastNo to the castNum of sprite vNowSprite
- set vCastName to the name of cast vCastNo
- if (vCastName contains "NOOP") or (vCastName contains "DOWN") then
- set vNowSprite to 0
- end if
- end if
- if not (vNowSprite = 0) then
- hRollOverOn(vNowSprite)
- set gLastSprite to vNowSprite
- else
- puppetSprite(gLastSprite, 0)
- set gLastSprite to 0
- end if
- end
-
- on hRollOverOn vNowSprite
- global gLastSprite
- if not (gLastSprite = vNowSprite) then
- set vCastNo to the castNum of sprite vNowSprite
- set vCastNam to the name of cast vCastNo
- puppetSprite(vNowSprite, 1)
- set the castNum of sprite vNowSprite to the number of cast (vCastNam & "-ROLLOVER")
- if not (gLastSprite = 0) then
- puppetSprite(gLastSprite, 0)
- updateStage()
- end if
- else
- nothing()
- end if
- end
-
- on hStillDownScript aSprite
- if aSprite = 8 then
- adjustVRPos(0, 5, 0)
- else
- if aSprite = 9 then
- adjustVRPos(0, -5, 0)
- else
- if aSprite = 10 then
- adjustVRPos(5, 0, 0)
- else
- if aSprite = 11 then
- adjustVRPos(-5, 0, 0)
- else
- if aSprite = 12 then
- adjustVRPos(0, 0, 5)
- else
- if aSprite = 13 then
- adjustVRPos(0, 0, -5)
- end if
- end if
- end if
- end if
- end if
- end if
- end
-